package com.njym.java.security.app.rest;

import com.njym.java.security.app.biz.TypetblBiz;
import com.njym.java.security.app.entity.Typetbl;
import com.njym.java.security.common.msg.ObjectRestResponse;
import com.njym.java.security.common.rest.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Controller
@RequestMapping("typetbl")
public class TypetblController extends BaseController<TypetblBiz,Typetbl> {

    @RequestMapping(value = "/getPageInfo", method = RequestMethod.GET)
    @ResponseBody
    public Object getPageInfo(){
        Example example = new Example(Typetbl.class);
        example.createCriteria().andEqualTo("deleted",1);       //deleted为1时启用，为0时不启用
        List<Typetbl> list = baseBiz.selectByExample(example);
        return new ObjectRestResponse<>().rel(true).data(list);
    }

}